package lab02.test06;

import java.util.Scanner;

/**
 * Created by Jammy on 2017/10/15.
 */

public class Test06 {
    public static void main(String[] args) {

      //这是三角形的测试类
       /* Scanner sc=new Scanner(System.in);
        Triangle triangle=new Triangle();
        System.out.println("请输入三角形的三边：");
        double a = sc.nextDouble();
        double b = sc.nextDouble();
        double c = sc.nextDouble();
        triangle.setA(a);
        triangle.setB(b);
        triangle.setC(c);

        if (triangle.triangle() == true){
            System.out.println("该三角形的周长为" + triangle.length());
            System.out.println("该三角形的面积为" + triangle.area());
            System.out.println("请输出要改的值：");
            double arevise = sc.nextDouble();
            double brevise = sc.nextDouble();
            double crevise = sc.nextDouble();
            triangle.revise(arevise,brevise,crevise);
        }else
            System.out.println("该三边不能构成三角形。");
    }*/


       //这是梯形的测试类
       /* Scanner sc=new Scanner(System.in);
        Ladder ladder=new Ladder();
        System.out.println("请输入梯形的上底： "+"下底： "+"高： ");
        int top=sc.nextInt();
        int bottom=sc.nextInt();
        int height=sc.nextInt();

        ladder.setTop(top);
        ladder.setBottom(bottom);
        ladder.setHeight(height);

        System.out.println("面积为："+ladder.area());
    }*/


           //这是圆的测试类
            Scanner sc = new Scanner(System.in);
            Circle circle = new Circle();
            System.out.println("请输入圆的半径：");
            Double r = sc.nextDouble();
            circle.setR(r);

            System.out.println("周长为：" + circle.length() + "\t" + "面积为：" + circle.area());
        }

    }

